﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.IteratorPattern.BuyTicket.Abstract
{
    /// <summary>
    /// 抽象的迭代器类
    /// </summary>
    public abstract class AbstractIterator
    {
        /// <summary>
        /// 得到集合的第一个元素
        /// </summary>
        /// <returns></returns>
        public abstract object First();

        /// <summary>
        /// 得到集合的最后一个元素
        /// </summary>
        /// <returns></returns>
        public abstract object Last();

        /// <summary>
        /// 得到集合的下一个元素
        /// </summary>
        /// <returns></returns>
        public abstract object Next();

        /// <summary>
        /// 得到集合的上一个元素
        /// </summary>
        /// <returns></returns>
        public abstract object Previous();

        /// <summary>
        /// 得到集合的当前元素
        /// </summary>
        /// <returns></returns>
        public abstract object CurretItem();

        /// <summary>
        /// 是否完成
        /// </summary>
        /// <returns></returns>
        public abstract bool IsDone();
    }
}
